package com.kx.kxpicture.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kx.kxpicture.model.dto.space.SpaceAddRequest;
import com.kx.kxpicture.model.dto.space.SpaceQueryRequest;
import com.kx.kxpicture.model.dto.spaceuser.SpaceUserAddRequest;
import com.kx.kxpicture.model.dto.spaceuser.SpaceUserEditRequest;
import com.kx.kxpicture.model.dto.spaceuser.SpaceUserQueryRequest;
import com.kx.kxpicture.model.entity.Space;
import com.kx.kxpicture.model.entity.SpaceUser;
import com.baomidou.mybatisplus.extension.service.IService;
import com.kx.kxpicture.model.entity.User;
import com.kx.kxpicture.model.vo.SpaceUserVO;
import com.kx.kxpicture.model.vo.SpaceVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author kuang
* @description 针对表【space_user(空间用户关联)】的数据库操作Service
* @createDate 2025-09-13 11:45:49
*/
public interface SpaceUserService extends IService<SpaceUser> {
    /**
     * 构造查询条件
     *
     * @param spaceUserQueryRequest
     * @return
     */
    QueryWrapper<SpaceUser> getQueryWrapper(SpaceUserQueryRequest spaceUserQueryRequest);

    /**
     * 创建空间用户
     *
     * @param spaceUserAddRequest
     * @return
     */
    public long addSpaceUser(SpaceUserAddRequest spaceUserAddRequest);

    /**
     * 获取空间包装类
     *
     * @param spaceUser

     * @return
     */
    SpaceUserVO getSpaceUserVo(SpaceUser spaceUser, HttpServletRequest request);

    /**
     * 获取空间包装类列表
     *
     * @param spaceUser
     * @return
     */
    List<SpaceUserVO> getSpaceUserVOList(List<SpaceUser> spaceUser);

    /**
     * 校验空间的参数
     *
     * @param spaceUser
     * @param add
     */
    void validSpaceUser(SpaceUser spaceUser, boolean add);
}
